import matplotlib.pyplot as plt
from next_level.Finance_Data.make_plot import makeplot
from next_level.Finance_Data.stock_load import load_stock

def do_duo_plot(stock1_df,stock2_df):
    '''修改后的绘图函数
    获取两支股票的数据并绘制图形
    '''
    makeplot(stock1_df,'Close','MSFT')
    makeplot(stock2_df, 'Close', 'AAPL')

    plt.title('MSFT vs. AAPL')
    plt.show()


if __name__ == '__main__':
    stock1_df = load_stock('MSFT')
    stock2_df = load_stock('AAPL')
    do_duo_plot(stock1_df,stock2_df)

